package io.renren.modules.pms.controller;

import io.renren.common.entity.GoodsInfoEntity;
import io.renren.common.utils.R;
import io.renren.modules.pms.service.GoodsExpiredService;
import io.renren.modules.pms.service.GoodsStockRecordService;
import io.renren.modules.pms.vo.GoodsExpiredVO;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author JinYang
 * @version 1.0
 * @belongsProject supermarket-management-system
 * @belongsPackage io.renren.modules.pms.controller
 * @createTime 2024-08-16  10:42
 * @description TODO
 */
@RestController
@RequestMapping("pms/goods")
public class GoodsExpiredController {

    @Resource
    private GoodsExpiredService goodsExpiredService;


    /**
     * 临期商品统计
     * @return {@link R}
     */
    @RequestMapping("/expired")
    @RequiresPermissions("pms:goods:expired")
    public R expiredList(){
        GoodsExpiredVO goodsExpiredVO = goodsExpiredService.getExpired();
        return R.ok().put("goodsExpiredVO", goodsExpiredVO);
    }


}
